/**
 * Created by Administrator on 14-1-6.
 */
(function($) {
    var arkflow = $.arkflow;
    arkflow.PathPointStrategy = Base.extend({
        constructor : function(type, point) {
            point.pointType = type,
            this.point = point;

            this.paper = point.paper;
            this.path = point.path.pathConfig;
            this.fromEvent = point.path.fromNode;
            this.toEvent = point.path.toNode;
        },
        isLine : function(g, f, e) {
            var d, c;
            if ((g.x - e.x) == 0) {
                d = 1;
            } else {
                d = (g.y - e.y) / (g.x - e.x);
            }
            c = (f.x - e.x) * d + e.y;
            if ((f.y - c) < 10 && (f.y - c) > -10) {
                f.y = c;
                return true;
            }
            return false;
        },
        center : function(d, c) {
            return {
                x : (d.x - c.x) / 2 + c.x,
                y : (d.y - c.y) / 2 + c.y
            };
        },
        dragable: function() {
            return false;
        }
    });
})(jQuery);
